<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
  <head>
    <title>Erro</title>
  </head>
  <body>
    <strong>Erro: <span th:text="${erro.getMessage()}"/>. <a class="popup" href="#">Detalhes</a></strong>

    <div id="dialog" title="Erro" style="display: none;">
      <ul class="list-group">
        <li class="list-group-item"><strong th:text="${erro.getClass().getSimpleName()}"/>: <span th:text="${erro.getLocalizedMessage()}"/></li>
        <li class="list-group-item" th:each="item : ${erro.getStackTrace()}"><span th:text="${item}"></span></li>
      </ul>
    </div>

    <script>
    $(document).ready(function(){
      $(".popup").on("click", function(event){
        event.preventDefault();
        $( "#dialog" ).show();
        $( "#dialog" ).dialog({ width: 640, maxWidth: 1280, height: 480, maxHeight: 1080, resizable: true });
      });
    });
    </script>
  </body>
</html>
